package Executor;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;

public class ExecutorServiceTest {
    ExecutorService executorService = Executors.newSingleThreadExecutor();
    ExecutorService executorService1 = Executors.newFixedThreadPool(5);

    public static void main(String[] args) {
        ExecutorService ex = Executors.newCachedThreadPool();
        for(int i = 0;i<Integer.SIZE;i++){
            ex.execute(new Runnable() {
                @Override
                public void run() {
                    System.out.println(Thread.currentThread().getName());
                }
            });
        }

    }

}
